package com.ruoyi.youtian.service.impl;

import java.util.List;
import com.ruoyi.youtian.domain.vo.TEarlyWarningRecordVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.youtian.mapper.TEarlyWarningRecordMapper;
import com.ruoyi.youtian.domain.TEarlyWarningRecord;
import com.ruoyi.youtian.service.ITEarlyWarningRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 触发预警记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-10-12
 */
@Service
public class TEarlyWarningRecordServiceImpl implements ITEarlyWarningRecordService 
{
    @Autowired
    private TEarlyWarningRecordMapper tEarlyWarningRecordMapper;

    /**
     * 查询触发预警记录
     * 
     * @param id 触发预警记录主键
     * @return 触发预警记录
     */
    @Override
    public TEarlyWarningRecord selectTEarlyWarningRecordById(Long id)
    {
        return tEarlyWarningRecordMapper.selectTEarlyWarningRecordById(id);
    }

    /**
     * 查询触发预警记录列表
     * 
     * @param tEarlyWarningRecord 触发预警记录
     * @return 触发预警记录
     */
    @Override
    public List<TEarlyWarningRecord> selectTEarlyWarningRecordList(TEarlyWarningRecord tEarlyWarningRecord)
    {
        return tEarlyWarningRecordMapper.selectTEarlyWarningRecordList(tEarlyWarningRecord);
    }

    /**
     * 新增触发预警记录
     * 
     * @param tEarlyWarningRecord 触发预警记录
     * @return 结果
     */
    @Override
    public int insertTEarlyWarningRecord(TEarlyWarningRecord tEarlyWarningRecord)
    {
        return tEarlyWarningRecordMapper.insertTEarlyWarningRecord(tEarlyWarningRecord);
    }

    /**
     * 修改触发预警记录
     * 
     * @param tEarlyWarningRecord 触发预警记录
     * @return 结果
     */
    @Override
    public int updateTEarlyWarningRecord(TEarlyWarningRecord tEarlyWarningRecord)
    {
        return tEarlyWarningRecordMapper.updateTEarlyWarningRecord(tEarlyWarningRecord);
    }

    /**
     * 批量删除触发预警记录
     * 
     * @param ids 需要删除的触发预警记录主键
     * @return 结果
     */
    @Override
    public int deleteTEarlyWarningRecordByIds(String ids)
    {
        return tEarlyWarningRecordMapper.deleteTEarlyWarningRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除触发预警记录信息
     * 
     * @param id 触发预警记录主键
     * @return 结果
     */
    @Override
    public int deleteTEarlyWarningRecordById(Long id)
    {
        return tEarlyWarningRecordMapper.deleteTEarlyWarningRecordById(id);
    }

    @Override
    public List<TEarlyWarningRecordVo> selectTEarlyWarningRecordVoList(TEarlyWarningRecordVo tEarlyWarningRecordVo) {
        List<TEarlyWarningRecordVo> tEarlyWarningRecordVoList = tEarlyWarningRecordMapper.selectTEarlyWarningRecordVoList(tEarlyWarningRecordVo);
        return tEarlyWarningRecordVoList;
    }
}
